<template>
  <div>
    <Bluetable ref="blueTable" :t-head="tHead" :t-data="tableData" :child-open="childOpen" @childOpenData="setTrue" />
    <pagination :total="query.total" :page.sync="query.page" :limit.sync="query.limit" />

  </div>
</template>

<script>

export default {
  name: 'PtopTable',
  data() {
    return {
      childOpen: false,
      // pointDialogVisible: false,
      tHead: [
        {
          prop: 'date',
          label: '分类'
        },
        {
          prop: 'date',
          label: '编码'
        },
        {
          prop: 'date',
          label: '点评点'
        },
        {
          prop: 'date',
          label: '点评规则'
        }
      ],
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '111',
        status: ''
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '111',
        status: ''
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '111',
        status: ''
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '111',
        status: ''
      }],
      query: {
        total: 100,
        page: 1,
        limit: 10
      }
    }
  },
  methods: {
    getList() {
      console.log(1)
    },
    setTrue(res) {
      var selectBtn = this.$refs.blueTable.selectBtn
      if (selectBtn === '测试') {
        this.childOpen = res
      }
    }
  }
}
</script>

<style scoped lang="scss">

</style>
